Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Nextclade to Auspice 2.61+ #1555

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

ivan-aksamentov
Copy link
Member

@ivan-aksamentov ivan-aksamentov commented Nov 20, 2024

Fixes build https://github.com/nextstrain/nextclade/actions/runs/11903714964/job/33171209422?pr=1553#step:18:146

This attempts to adjust Nextclade to changes introduced in Auspice 2.61.0 and above.

This involves a few moved files and making sure ts files are included into monkey patching.

Sadly, entropy panel permanently shows "data loading" after any interaction with the tree (e.g. clicking on a branch or using filters)

I made an isolated /tree-debug page to reproduce and investigate the issue further:

const auspiceJson: AuspiceJsonV2 = useAxiosQuery(
'https://raw.githubusercontent.com/nextstrain/nextclade_data/refs/heads/master/data/nextstrain/sars-cov-2/wuhan-hu-1/orfs/tree.json',
)
const dispatch = useDispatch()
const auspiceState = createAuspiceState(auspiceJson, dispatch)
dispatch(auspiceStartClean(auspiceState))
dispatch(changeColorBy())
// dispatch(treeFilterByNodeType(['New']))
return (
<Layout>
<TreePageContent />
</Layout>

dependabot bot and others added 3 commits November 19, 2024 00:26
Bumps [auspice](https://github.com/nextstrain/auspice) from 2.59.1 to 2.61.2.
- [Release notes](https://github.com/nextstrain/auspice/releases)
- [Changelog](https://github.com/nextstrain/auspice/blob/master/CHANGELOG.md)
- [Commits](nextstrain/auspice@v2.59.1...v2.61.2)

---
updated-dependencies:
- dependency-name: auspice
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nextclade ✅ Ready (Inspect) Visit Preview Nov 20, 2024 2:36am

@jameshadfield
Copy link
Member

jameshadfield commented Nov 20, 2024

Sadly, entropy panel permanently shoes "data loading" after any interaction with the tree (e.g. clicking on a branch or using filters)

This is presumably due to this conditional where we skip the updating of the data behind the entropy panel if the panel's not rendered or off-screen. I'd guess the intersection observer we use to know if it's off-screen isn't working as expected within Nextclade. But it may also be the former if Nextclade doesn't use <reduxState>.controls.panelsToDisplay like vanilla Auspice does.

@ivan-aksamentov
Copy link
Member Author

@jameshadfield Wow, thanks! Yes, I've been trying to identify which additional parts of redux state and logic I need to hook up. Will look into it.

@ivan-aksamentov
Copy link
Member Author

@jameshadfield Alternatively, do you see an easy way to opt out of this optimization and render the entropy always, as before?

@jameshadfield
Copy link
Member

Alternatively, do you see an easy way to opt out of this optimization and render the entropy always, as before?

You could change the source code to modify the conditional to if (false) {, i.e. within monkeyPatch.ts. It's been a long time since I properly looked at how Nextclade uses Auspice, but skimming through things now makes me think you're using a very cut-down version of the (redux) controls state and adding panelsToDisplay: ['tree'] may be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants